import Vue from 'vue'
import Lazyload from 'vue-lazyload'
Vue.use(Lazyload, {
  filter: {
    webp(listener, options) {
      if (!options.supportWebp) return
      const isCDN = /suhoo.oss-cn-shenzhen.aliyuncs.com/
      if (isCDN.test(listener.src)) {
        listener.src += '?x-oss-process=image/format,webp'
      }
    },
  },
})
